package com.hfut.eeg.config;

import org.mybatis.spring.annotation.MapperScan;
import org.mybatis.spring.boot.autoconfigure.ConfigurationCustomizer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.transaction.annotation.EnableTransactionManagement;
/**
* @Description: Mybatis配置
* @author 梁琦
* @date 2019-12-30 20:07
* @throws
*/
@Configuration
@EnableTransactionManagement
@MapperScan({"com.hfut.eeg.dao"})
public class MyBatisConfig {
    @Bean
    public ConfigurationCustomizer setCustomizer(){
        return new ConfigurationCustomizer() {
            @Override
            public void customize(org.apache.ibatis.session.Configuration configuration) {
                configuration.setMapUnderscoreToCamelCase(true);
            }
        };
    }
}
